﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="ViewDisbursementHistory.aspx.cs" Inherits="PresentationLayer.ViewDisbursementHistory" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        .hide
        {
            display:none;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <div align="center">
         <h2>Disbursement History</h2>
         <br />
            <table class="table-condensed">

            <tr>
                <td>
                    <asp:Label ID="Label2" runat="server" CssClass="control-label" Text="From Date"></asp:Label>
                    </td>
                <td>
        <asp:TextBox ID="txtFromDate" runat="server" CssClass="form-control" Width="220px"></asp:TextBox>
                    </td>
                <td>
        <asp:ImageButton ID="ImageButton1" runat="server" Height="18px" ImageUrl="~/Images/calendar.jpg" OnClick="ImageButton1_Click1" Width="30px" />

                </td>
                <td> <asp:Label ID="Label3" runat="server" CssClass="control-label"  Text="To Date"></asp:Label>   </td>
                <td>
                    <asp:TextBox ID="txtToDate" runat="server" CssClass="form-control" Width="220px"></asp:TextBox>
                    </td>
              
                <td>
                    <asp:ImageButton ID="ImageButton2" runat="server" Height="18px" ImageUrl="~/Images/calendar.jpg" Width="26px" OnClick="ImageButton2_Click1" />
                </td>
                  <td>
                    
                    </td>
            </tr>
            <tr>
                <td class="auto-style1"></td>
                <td>
                    <asp:Calendar ID="calFromDate" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" OnSelectionChanged="calFromDate_SelectionChanged" ShowGridLines="True" Width="220px">
                <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                <OtherMonthDayStyle ForeColor="#CC9966" />
                <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                <SelectorStyle BackColor="#FFCC66" />
                <%--<TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" ForeColor="#FFFFCC" />--%>
                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
            </asp:Calendar>

                </td>
                <td></td>
                <td>    </td>
                <td class="auto-style2">
                     <asp:Calendar ID="calToDate" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66" BorderWidth="1px" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#663399" Height="200px" OnSelectionChanged="calToDate_SelectionChanged" ShowGridLines="True" Width="220px">
                <DayHeaderStyle BackColor="#FFCC66" Font-Bold="True" Height="1px" />
                <NextPrevStyle Font-Size="9pt" ForeColor="#FFFFCC" />
                <OtherMonthDayStyle ForeColor="#CC9966" />
                <SelectedDayStyle BackColor="#CCCCFF" Font-Bold="True" />
                <SelectorStyle BackColor="#FFCC66" />
                <TitleStyle BackColor="#990000" Font-Bold="True" Font-Size="9pt" ForeColor="#FFFFCC" />
                <TodayDayStyle BackColor="#FFCC66" ForeColor="White" />
            </asp:Calendar>

                </td>
            </tr>
            <tr>
                <td class="auto-style1"></td>
                <td></td>
                <td></td>
                <td></td>
                <td class="auto-style2">
                    <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" CssClass="btn-primary pull-right" />
                </td>
            </tr>
        </table>
         <br />
            <asp:GridView ID="dgvDisbursementHistory" EmptyDataText="No Disbursement Data" runat="server" AutoGenerateColumns="False" OnRowDataBound="dgvDisbursementHistory_RowDataBound" OnRowCommand="dgvDisbursementHistory_RowCommand" CssClass="table-condensed">
                    <Columns>
                        <asp:TemplateField HeaderText="No.">
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="CollectionDate" HeaderText="Collection Date" DataFormatString="{0:d}" /> 
                        <asp:BoundField DataField="CollectionTime" HeaderText="Collection Time" DataFormatString="{0:t}" /> 
                        <asp:BoundField DataField="CollectionPointName" HeaderText="Collection Point" />
                        <asp:TemplateField HeaderText="Status">
                            <ItemTemplate>
                                <asp:Label ID="lblStatus" runat="server" />
                                <asp:Label ID="lblCpDetialID" runat="server" Text='<%#Eval("CollectionPointDetailID") %>' Visible="false" />
                                <asp:Label ID="lblCStatus" runat="server" Text='<%#Eval("CollectedBy") %>' Visible="false" />
                                <asp:Label ID="lblDStatus" runat="server" Text='<%#Eval("DisbursedBy") %>' Visible="false" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:buttonfield buttontype="Button"  commandname="Select" headertext="Detail" text="View Detail">
                        <ControlStyle CssClass="btn-info" />
                        </asp:buttonfield>
                        <asp:BoundField DataField="CollectionPointDetailID" HeaderText="Collection Point Detail ID" HeaderStyle-CssClass="hide" ItemStyle-CssClass="hide">

                            </asp:BoundField>
                    </Columns>
                </asp:GridView>
        </div>
    <br />
    <br />

</asp:Content>
